<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>协同调度信息系统 - 登录</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .login-container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            padding: 40px;
            width: 100%;
            max-width: 400px;
        }
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        .login-header h1 {
            color: #333;
            font-weight: 700;
            margin-bottom: 10px;
        }
        .login-header p {
            color: #666;
            margin: 0;
        }
        .form-control {
            border-radius: 10px;
            border: 2px solid #e1e5e9;
            padding: 12px 15px;
            font-size: 16px;
        }
        .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
        .btn-login {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            border-radius: 10px;
            padding: 12px;
            font-size: 16px;
            font-weight: 600;
            width: 100%;
            margin-top: 20px;
        }
        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }
        .role-info {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-top: 30px;
        }
        .role-info h6 {
            color: #333;
            font-weight: 600;
            margin-bottom: 15px;
        }
        .role-item {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            padding: 8px 0;
        }
        .role-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            font-size: 14px;
            color: white;
        }
        .recon { background: #28a745; }
        .analyst { background: #17a2b8; }
        .decision { background: #ffc107; color: #333 !important; }
        .executor { background: #dc3545; }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <h1><i class="fas fa-shield-alt"></i> 协同调度信息系统</h1>
            <p>请登录以访问您的角色界面</p>
        </div>

        {% with messages = get_flashed_messages() %}
            {% if messages %}
                {% for message in messages %}
                    <div class="alert alert-danger alert-dismissible fade show" role="alert">
                        {{ message }}
                        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}

        <form method="POST">
            {{ form.hidden_tag() }}
            
            <div class="mb-3">
                <label for="username" class="form-label">
                    <i class="fas fa-user"></i> 用户名
                </label>
                {{ form.username(class="form-control", placeholder="请输入用户名") }}
            </div>

            <div class="mb-3">
                <label for="password" class="form-label">
                    <i class="fas fa-lock"></i> 密码
                </label>
                {{ form.password(class="form-control", placeholder="请输入密码") }}
            </div>

            {{ form.submit(class="btn btn-primary btn-login") }}
        </form>
<!-- 
        <div class="role-info">
            <h6><i class="fas fa-info-circle"></i> 测试账户</h6>
            
            <div class="role-item">
                <div class="role-icon recon">
                    <i class="fas fa-search"></i>
                </div>
                <div>
                    <strong>侦察员:</strong> recon1 / recon123
                </div>
            </div>
            
            <div class="role-item">
                <div class="role-icon analyst">
                    <i class="fas fa-chart-line"></i>
                </div>
                <div>
                    <strong>分析员:</strong> analyst1 / analyst123
                </div>
            </div>
            
            <div class="role-item">
                <div class="role-icon decision">
                    <i class="fas fa-gavel"></i>
                </div>
                <div>
                    <strong>决策员:</strong> decision1 / decision123
                </div>
            </div>
            
            <div class="role-item">
                <div class="role-icon executor">
                    <i class="fas fa-cogs"></i>
                </div>
                <div>
                    <strong>执行员:</strong> executor1 / executor123
                </div>
            </div>
        </div> -->
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>